<!DOCTYPE html>
<html>
  <head>
    <title>email.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <link rel="stylesheet" tyle="text/css" href="../css/jquery-ui-1.10.3.custom.min.css">
    <script type="text/javascript" src="../css/jquery-ui-1.10.3.custom.js"></script>
	<script type="text/javascript" src="../javascript/lib/jquery-1.9.1/jquery-1.9.1.min.js"></script>
	<!-- 用于特性检测 -->
	<script type="text/javascript" src="../javascript/lib/plusin/modernizr-1.7.min.js"></script>
	
	<script type="text/javascript">
		$(function(){
			var emailRegEx = /^([\w-.]+@([\w-]+.)+[\w-]{2,4})?$/;
			$("#errorMsg").hide();
			if(!Modernizr.inputtypes.email){
				$("input[type='email']").blur(function(){
					var emailval = $(this).val();
					if(emailval !== ""){
						var pass = emailRegEx.test(emailval);
						if(!pass){
							$("#errorMsg").show();	
						}else{
							$("#errorMsg").hide();
						}
					}
				});
			}
		})
	</script>
  </head>
  
  <body>
    <input type="email" name="email" />
    <input type="submit" />
    <div id="errorMsg">Invalid Email format.</div>
  </body>
</html>
